home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98a.txt / 000168_icon-group-sender _Thu Apr 16 14:55:54 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  9KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id OAA06576
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Thu, 16 Apr 1998 14:55:53 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA28494; Thu, 16 Apr 1998 14:55:52 -0700
  7. Message-Id: <s5362d99.023@housmtp.oceaneering.com>
  8. X-Mailer: Novell GroupWise 4.1
  9. Date: Thu, 16 Apr 1998 16:09:15 -0600
  10. From: Charles Hethcoat <CHETHCOA@oss.oceaneering.com>
  11. To: icon-group@optima.CS.Arizona.EDU
  12. Subject: Icon Sims -Reply
  13. Mime-Version: 1.0
  14. Content-Type: text/plain
  15. Content-Disposition: inline
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18. Content-Length: 7569
  19.  
  20. Mark Evans wrote:
  21.  
  22. +I understand why you think that the web is the most convenient
  23. cross-platform interface.  I suppose I agree with that proposition.
  24.  
  25. Well, it seems there is some disagreement on this point.  It IS clumsy and
  26. inefficient, but for me, with what I know now, and my circumstances, it
  27. looks like the easiest and fastest way to get "on the air" with the minimum
  28. assumptions about the user's hardware, software, and situation.
  29.  
  30. + But
  31. what makes Icon special for the simulation aspect?  I.e. what about
  32. numerical programs like Mathematica and MATLAB?  They are also
  33. cross-platform.
  34.  
  35. Yes.  I don't have any problem with them, just little experience.  My
  36. company doesn't buy stuff on a whim, so I just don't have them.  Which
  37. is part of the reason I haunt free software venues like this one!  I did
  38. download Octave (the free MATLAB lookalike) to try it out.
  39.  
  40. But this, as they say, is an Icon mailing list.  So I just wanted to point out
  41. that Icon has underappreciated potential as a tool for writing small,
  42. experimental programs for engineers and scientists.  And it is looking
  43. pretty http-friendly as well.  So I say, "if you are thinking of coding
  44. something in C or Fortran or Pascal, do yourself a favor:  look at Icon."
  45.  
  46. +Off the top of my head, it would never have dawned on me to do
  47. simulations in Icon.  Have you been very successful?
  48.  
  49. On a small scale, yes...but I hasten to add I don't do a lot of extremely
  50. LARGE simulations.  I have seen enough to convince me we have barely
  51. scratched the surface of what can be done with Icon in this type of
  52. application.  Based on what I know now, I would not hesitate to try
  53. writing a twenty-degree-of-freedom automobile simulation program in
  54. Icon.  If I needed to, of course.
  55.  
  56. +  Is there anything
  57. about the Icon language that makes doing simulations easier than any
  58. other?  
  59.  
  60. It has all the basic floating point necessities, if not the conveniences, of
  61. Fortran.  But the facility in handling lists, strings, tables, records, etc. is
  62. what makes it really shine.  I can easily add identifiers, a cool input
  63. notation, and use all kinds of computer science algorithms (sorts, tree
  64. and graph searches, etc.) and code all of it without much declarative
  65. hassle.  You can do this stuff in Fortran and C but it's exhausting.  With
  66. Icon, it's easy.
  67.  
  68. +Could you outline the nature of your software for me?  What does
  69. it do?  What is it for?  What does the user see?
  70.  
  71. +Would you be willing to share your code with me?  I might find uses for
  72. it and could possibly enhance it.  I have to earn a living too, but I
  73. work as a consultant and my clients generally let me pick my own tools.
  74.  
  75. My Runge-Kutta stuff is still being debugged.  The constant-stepsize
  76. version works like a champ.  The variable-stepsize version is under
  77. construction...I should be trying it out this weekend.  It came about
  78. because I needed to replace a certain TK Solver program.  This program
  79. calculates venting of space vehicles, and the attendant pressure
  80. differentials, with a view to validating the structural design.  It involves
  81. solving a nonlinear first-order ordinary differential equation.  The TK
  82. version works fine.  But, and this is a big BUT, it is too hard for casual
  83. users to comprehend.  I can and do use it, but I would like to post it on
  84. our local network for others to use as well.  Trouble is, hardly anybody
  85. knows TK, and it isn't all that easy to set up.  So I want to replace it with
  86. a program and a set of instructions that are easy for anybody to deal
  87. with.
  88.  
  89. I have been meaning to put some of it in the library and have just been
  90. procrastinating.  I'll try to speed this up.
  91.  
  92. Here is what vcalc, the vector calculator, does:
  93.  
  94. (BEGINNING OF VCALC INPUT)
  95. This is an example
  96. of vcalc input.  This is
  97. a paragraph
  98. of ASCII words
  99. that will be processed
  100. by some kind of
  101. document preparation
  102. software, say LaTex,
  103. when the proper markup
  104. is added.  But now
  105. I just want to show what
  106. vcalc does by itself.
  107.  
  108. Vcalc uses RPN ("Shilop")
  109. notation, which makes
  110. some people go ):?(
  111. but makes implementors
  112. like me go (|:?=).
  113. (Really, RPN is not
  114. essential to the idea of vcalc.
  115. It's just easy to do.)
  116.  
  117. Multiple paragraphs
  118. are separated
  119. by blank
  120. lines.
  121.  
  122. The '>' character in position 1
  123. introduces a calculation:
  124.  
  125. > 2 a=; 3 b=; 7 c=;
  126. > a \sqr
  127. > b \sqr \add
  128. > c \sqr \add \sqrt L= \print;
  129.  
  130. See how the answer is
  131. printed out in-line
  132. in the output? That's
  133. to leave an audit trail
  134. when calculations start
  135. getting really rough.
  136.  
  137. Then more ordinary
  138. textual material
  139. follows.
  140.  
  141. Here is another example:
  142.  
  143. > 2 3 \mul 7 \add \print;
  144.  
  145. Vcalc can also do vectors.
  146. For example, what is the
  147. moment of force F about
  148. point A, if it acts through
  149. point B?
  150.  
  151. GIVEN:
  152.  
  153. The force F is
  154. > (4.3, 5.7, -0.2) F=;
  155.  
  156. Points A and B are
  157. > (0., 0., 0.) A=;
  158. and
  159. > (1., 1., 3.) B=;
  160.  
  161. REQUIRED:
  162.  
  163. The torque T of F about
  164. B.
  165.  
  166. METHOD:
  167.  
  168. The radius vector R is B - A, or:
  169. > B A \sub R= \print;
  170.  
  171. The torque is the cross product
  172. F x R, or
  173. > F R \cross T= \print;
  174.  
  175. And that's really the whole idea.
  176.  
  177. Charles Hethcoat
  178. (END OF VCALC INPUT)
  179.  
  180. Now you run this through vcalc and get:
  181.  
  182. (BEGINNING OF VCALC OUTPUT)
  183.      vcalc:  Oceaneering Space Systems' Vector Calculator
  184.      $Id: vcalc.icn 1.3 1998/02/17 17:02:27 CHETHCOA Exp CHETHCOA $
  185.      Run date:  Thursday, April 16, 1998  2:45 pm
  186.  
  187.     1     This is an example
  188.     2     of vcalc input.  This is
  189.     3     a paragraph
  190.     4     of ASCII words
  191.     5     that will be processed
  192.     6     by some kind of
  193.     7     document preparation
  194.     8     software, say LaTex,
  195.     9     when the proper markup
  196.    10     is added.  But now
  197.    11     I just want to show what
  198.    12     vcalc does by itself.
  199.    13     
  200.    14     Vcalc uses RPN ("Shilop")
  201.    15     notation, which makes
  202.    16     some people go ):?(
  203.    17     but makes implementors
  204.    18     like me go (|:?=).
  205.    19     (Really, RPN is not
  206.    20     essential to the idea of vcalc.
  207.    21     It's just easy to do.)
  208.    22     
  209.    23     Multiple paragraphs
  210.    24     are separated
  211.    25     by blank
  212.    26     lines.
  213.    27     
  214.    28     The '>' character in position 1
  215.    29     introduces a calculation:
  216.    30     
  217.    31     > 2 a=; 3 b=; 7 c=;
  218.    32     > a \sqr
  219.    33     > b \sqr \add
  220.    34     > c \sqr \add \sqrt L= \print;
  221.  
  222.           -----> L = 7.874007874011811
  223.  
  224.    35     
  225.    36     See how the answer is
  226.    37     printed out in-line
  227.    38     in the output? That's
  228.    39     to leave an audit trail
  229.    40     when calculations start
  230.    41     getting really rough.
  231.    42     
  232.    43     Then more ordinary
  233.    44     textual material
  234.    45     follows.
  235.    46     
  236.    47     Here is another example:
  237.    48     
  238.    49     > 2 3 \mul 7 \add \print;
  239.  
  240.           ----->  = 13
  241.  
  242.    50     
  243.    51     Vcalc can also do vectors.
  244.    52     For example, what is the
  245.    53     moment of force F about
  246.    54     point A, if it acts through
  247.    55     point B?
  248.    56     
  249.    57     GIVEN:
  250.    58     
  251.    59     The force F is
  252.    60     > (4.3, 5.7, -0.2) F=;
  253.    61     
  254.    62     Points A and B are
  255.    63     > (0., 0., 0.) A=;
  256.    64     and
  257.    65     > (1., 1., 3.) B=;
  258.    66     
  259.    67     REQUIRED:
  260.    68     
  261.    69     The torque T of F about
  262.    70     B.
  263.    71     
  264.    72     METHOD:
  265.    73     
  266.    74     The radius vector R is B - A, or:
  267.    75     > B A \sub R= \print;
  268.  
  269.           -----> R = (1.0, 1.0, 3.0)
  270.  
  271.    76     
  272.    77     The torque is the cross product
  273.    78     F x R, or
  274.    79     > F R \cross T= \print;
  275.  
  276.           -----> T = (17.3, -13.1, -1.4)
  277.  
  278.    80     
  279.    81     And that's really the whole idea.
  280.    82     
  281.    83     Charles Hethcoat
  282. (END OF VCALC OUTPUT)
  283.  
  284. Yours,
  285. Charlie
  286.  
  287.